addMenuProvider
Adds the given MenuProvider to the helper.
Parameters
provider
the MenuProvider to be added
Adds the given MenuProvider to the helper. This MenuProvider will be removed once the given LifecycleOwner receives an Lifecycle.Event.ON_DESTROY event.
Parameters
provider
the MenuProvider to be added
owner
the Lifecycle owner whose state will determine the removal of the provider
open fun addMenuProvider(@NonNull provider: MenuProvider, @NonNull owner: LifecycleOwner, @NonNull state: Lifecycle.State)(source)
Adds the given MenuProvider to the helper once the given LifecycleOwner reaches the given Lifecycle.State. This MenuProvider will be removed once the given LifecycleOwner goes down from the given Lifecycle.State or receives an Lifecycle.Event.ON_DESTROY event.
Parameters
provider
the MenuProvider to be added
state
the Lifecycle.State to check for automated addition/removal
owner
the Lifecycle owner whose state will determine the removal of the provider